

//
//  BookWebController.m
//  DFront
//
//  Created by lanou on 15/10/28.
//  Copyright © 2015年 xuzenghui. All rights reserved.
//

#import "BookWebController.h"
#import "RTSpinKitView.h"
@interface BookWebController ()<UIWebViewDelegate>
@property (nonatomic,strong)RTSpinKitView *refreash;
@end

@implementation BookWebController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationController.navigationBar.hidden = YES;
    UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 64, kScreenWidth, kScreenHeight)];
    NSString *str1 = @"http://m.zol.com.cn/nbbbs/d";
    NSString *str2 = [str1 stringByAppendingString:self.bstr];
    NSString *str3 = [str2 stringByAppendingString:@"_"];
    NSString *str4 = [str3 stringByAppendingString:self.cstr];
    NSString *str5 = [str4 stringByAppendingString:@".html"];
    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:str5]]];
    [self.view addSubview:webView];
    [self.view addSubview:self.topView];
    [self.topView addSubview:self.backBtn];
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 20)];
    label.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:label];


    //  加载动画
    CGRect screenBounds = [[UIScreen mainScreen] bounds];
    _refreash = [[RTSpinKitView alloc]initWithStyle:RTSpinKitViewStyleWanderingCubes color:[UIColor redColor]];
    _refreash.center = CGPointMake(CGRectGetMidX(screenBounds), CGRectGetMidY(screenBounds));
    [self.view addSubview:_refreash];
    
}

-(void)webViewDidFinishLoad:(UIWebView *)webView
{
    [_refreash removeFromSuperview];
}

@end
